package com.heima.article.job;

import com.heima.article.service.HotArticleService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
@Component
public class ArticleJob {
    @Resource
    private HotArticleService hotArticleService;

    @XxlJob("computeHotArticleJob")
    public void computeHotArticleJob() {
        System.out.println("=======更新热门文章======");
        hotArticleService.ComputeHotArticle();
    }
}
